﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Corvus.Infrastructure
{
    public static class LoggerLevelEx
    {

        public static NLog.LogLevel ToNLogLevel(this LogLevel level)
        {
            switch (level)
            {
                case LogLevel.Error:
                    return NLog.LogLevel.Error;
                case LogLevel.Fatal:
                    return NLog.LogLevel.Fatal;
                case LogLevel.Information:
                    return NLog.LogLevel.Info;
                case LogLevel.Verbose:
                    return NLog.LogLevel.Debug;
                case LogLevel.Warning:
                    return NLog.LogLevel.Warn;
                default:
                    return NLog.LogLevel.Off;
            }
        }

    }
}
